<?php
error_reporting(E_ALL);


if (isset($_POST['curl'])){

    $url = 'http://mash.pp.ua/calc126/calc_service.php';
    $ch = curl_init();
    $post = Array("calcme"=>"{$_POST['curl']}", "key"=>"{$_POST['key']}");

    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,0);  
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

    $result = curl_exec ($ch);

}



if(isset($_POST['soap'])){
    $client = new SoapClient("calc.wsdl");
    echo $client->getQuote($_POST['soap']); 
}

?>
